#include <stdio.h>
#include <stdlib.h>
#include "point_set.h"

int main() {
    Point *visited_set = NULL;  // 初始化集合为空
    unsigned int points_to_visit[] = {1, 2, 3, 4, 2, 5, 1};
    int num_points = sizeof(points_to_visit) / sizeof(points_to_visit[0]);

    for (int i = 0; i < num_points; i++) {
        unsigned int point = points_to_visit[i];
        if (is_visited(visited_set, point)) {
            printf("Point %u has already been visited.\n", point);
        } else {
            printf("Point %u has not been visited yet. Adding to set.\n", point);
            add_point(&visited_set, point);
        }
    }

    free_set(visited_set);  // 释放集合内存

    return 0;
}